package cn.tedu.submarine;

import javax.swing.*;
import java.util.Random;

//鱼雷潜艇
public class TorpedoSubmarine extends SeaObject implements EnemyScore{

    public TorpedoSubmarine(){
        super(64,20);
    }
    @Override
    public void step(){
        x += speed; //x代表横坐标，x+(向右)
    }
    @Override
    public ImageIcon getImage(){
        return Images.torpesubm; //返回鱼雷战舰图片
    }
    /** 重写getScore()得分*/
    public int getScore(){
        return 40; //打掉鱼雷潜艇，玩家得40分
    }

}
